<template>
  <el-dialog v-dialogDrag :title="noticeType" :visible="isShow" width="50%" @close="dialogClose">
    <el-card class="box-card" style="margin-bottom: 20px">
      <div class="clearfix">
        <span>{{ this.record.name }}</span>
      </div>
      <el-divider></el-divider>
      <!-- 公告内容 -->
      <div class="text-content">
        {{ this.record.content }}
      </div>
      <!-- <el-divider></el-divider> -->
      <div class="time">{{ this.record.createTime }}</div>
    </el-card>
  </el-dialog>
</template>

<script>
export default {
  data () {
    return {
      rules: {},
      noticeType:''
    };
  },
  props: {
    isShow: {
      type: Boolean,
    },
    record: { type: Object },
  },

  methods: {
    dialogClose () {
      this.$emit("close");
    },
  },
  mounted () {
    this.record.createTime = this.record.createTime.substring(0, 10);
    this.noticeType=this.record.type
  },
};
</script>

<style scoped lang="less">

.clearfix {
  width: 100%;
  font-size: 15px;
  font-weight: 600;
  text-align: center;
}
.text-content{
  padding: 0px 10px;
}
.time {
  text-align: right;
  // font-weight: bold;
  margin: 20px 10px 16px;
}
/deep/ .el-card__body{
  padding: 10px 40px;
}
</style>
